package cn.edu.scau.cmi.zhangsan.interProgramming;

public class Marshal {
	private static Marshal[] marshal=new Marshal[10];
	private static int num=0;
	private String name;
	private Marshal(String name)
	{
		this.name=name;
	}
	private Marshal()
	{
		
	}
	public static Marshal getInstance(String name)
	{
		if(num<10)
		{
			marshal[num]=new Marshal(name);
			num++;
		}
		return marshal[num-1];
	}
	public String getName(int num)
	{
		return marshal[num].name;
	}
	public int getNum()
	{
		return num;
	}
}
